@namespace BulmaRazor.Components
@inherits BulmaComponentBase

<figure @attributes="Attributes" class="@classes">
    @ChildContent
</figure>


@code {

    string classes => CssBuilder.Default("image")
        .AddClassFromAttributes(Attributes)
        .AddClass(Size.Value, Size.Value)
        .AddClass(Ratio.Value, Ratio.Value)
        .AddClass("is-fullwidth", IsFullwidth)
        .Build();


    /// <summary>
    /// 尺寸，使用Square*大小
    /// </summary>
    [Parameter]
    public Size Size { get; set; } = Size.Default;

    /// <summary>
    /// 比例
    /// </summary>
    [Parameter]
    public Ratio Ratio { get; set; } = Ratio.Default;

    /// <summary>
    /// 全宽
    /// </summary>
    [Parameter]
    public bool IsFullwidth { get; set; }

    /// <summary>
    /// 子内容
    /// </summary>
    [Parameter]
    public RenderFragment ChildContent { get; set; }

}